<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<!--引入vue-->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<div id="app">
  <h2>{{firstName}} {{lastName}}</h2>
  <h2>{{firstName+" "+lastName}}</h2>
  <h2>{{getFullName()}}</h2>
  <h2>{{fullName}}</h2>
</div>
<script>
  const app = new Vue({
    el: "#app",
    data: {
      message: "Hello zk I am Vue !",
      firstName: 'zhuang',
      lastName: 'kang'
    },
    computed: {

      fullName(){
        return this.firstName+" "+this.lastName
      }
    },
    methods:{
      getFullName(){
        return this.firstName+" "+this.lastName
      }
    }
  })
</script>
</body>
</html>
